﻿using System;
using System.Globalization;

namespace Gem
{
    public static class Utils
    {
        /// <summary>
        /// Verify a given parameter is not null.
        /// </summary>
        /// <param name="parameter">The verified parameter.</param>
        /// <param name="name">The name of the parameter verified.</param>
        public static void GuardNotNull(object parameter, string name)
        {
            if (parameter == null)
            {
                throw new NullReferenceException(string.Format(CultureInfo.InvariantCulture, "Parameter '{0}' cannot be null", name));
            }
        }
    }
}
